package com.lyk.coursearrange.common.core.base.code;

import lombok.Getter;
import lombok.ToString;

/**
 * 全局统一状态码类(状态码范围：000000~999999)
 * @author 然子哥
 */
@Getter
@ToString
public enum CodeEnum
{
    SUCCESS(true, 200,"成功"),
    UNKNOWN_REASON(false, 20001, "未知错误"),
    AN_UNEXPECTED_ERROR(false,20002, "未期许的错误，平台功能暂未拓展"),

    POST_ADD_JUR(false,11011,"岗位设置权限失败"),
    USER_VCODE_WITHOUT_TIMEOUT(false,10001,"同一手机号60内只能发送一次验证码"),
    USER_VCODE_NOT_EXISTS(false,10002,"请重新获取验证码"),
    USER_VCODE_INVAlID(false,10003,"验证码不正确"),
    USER_lOGIN_PHONE(false,10004,"账号不存在"),
    USER_lOGIN_PASSWORD(false,10005,"密码不正确"),
    USER_TICKETBUYER_NOT_EXISTS(false,10006,"身份证已经存在"),
    PHONE_NUMBER_ERROR(false,10007,"手机号格式不正确"),
    PHONE_NUMBER_EXISTS_ERROR(false,10008,"该手机号已经存在了"),
    IDNUMBER_ERROR(false,10009,"身份证格式不正确"),
    IDNUMBER_EXISTS_ERROR(false,10010,"该身份证已经存在了"),
    PERSONNEL_NAME_MUST_NOT_HAVE_NUMBER(false,10011,"用户姓名不能有数字"),
    PASS_AGAIN(false,10012 ,"密码不一请重新输入" ),
    USER_ADD(false,11001,"人员添加失败"),
    USER_UPD(false,11002,"人员修改失败"),
    USER_DEL(false,11003,"人员删除失败"),
    THREE_LEVEL_IS_NOT(false,11004,"选择资料类别错误，请选择三级资料类别"),
    MEAN_SPECIFICATION_RELATION_IS_EXIST(false,11005,"资料类型和范例表已经存在关系了"),


    JUR_ADD(false,11014,"权限添加失败"),
    JUR_UPD(false,11015,"权限修改失败"),
    JUR_DEL(false,11016,"权限删除失败"),


    PASS_ERROE(false,11020,"密码错误"),
    PASS_UPD(false,11021,"密码修改失败"),


    Engineering_ADD(false,11022,"工程信息添加失败"),


    BAD_SQL_GRAMMAR(false, 13001, "sql语法错误"),
    JSON_PARSE_ERROR(false, 13002, "json解析异常"),
    PARAM_ERROR(false, 13003, "参数不正确"),


    LOGIN_ACL(false, 14001, "没有权限"),


    IMAGE_IMPORT_ERROR(false,16001, "图片上传失败"),
    IMAGE_PACKAGE_ZIP_IMPORT_ERROR(false,16002, "图片压缩包上传失败"),


    DATABASE_NO_SET_PER_FLAG(false,17001, "数据库未给该人员设置身份标记"),
    PERSONNEL_EXIST_ORGANIZATION(false,17002, "该人员已经存在组织"),
    USER_VCODE_INVALID(false,17003 ,"验证码不正确" ),

    APPENDIX_ADD(false,17004 ,"附件添加失败" ),
    CATALOGUE_ADD(false,17005,"目录列添加失败"),
    CATALOGUE_ADD_HAVE(false,17006,"目录已存在"),
    CATALOGUE_UPDATE(false,17007,"目录列添加失败"),



    Duplicate_Data_Name(false,17008,"资料名称重复"),
    CUSTOMER_ADD(false,17009 ,"客资添加失败" ),
    Customer_State_Update(false,17010 ,"客资状态修改失败" ),
    Customer_State_Delete(false,17011 ,"客资信息删除失败" ),
    Customer_Student(false,170012 ,"学生姓名修改成功" ),
    WXEXIT(false,170013 ,"微信号已经存在" ),
    EXCEL_DATA_EXPORT_ERROR(false,170014 ,"客资数据导出失败" ),
    SignNo(false,170015 ,"学员未全部签到" ),
    JOBADD(false,170016 ,"职级添加失败" ),
    JOBSET(false, 170017,"职级设置成功" ),
    JOBNAME(false,170018 ,"职级名字重复" );

    /**
     * 构建CodeEnum方法
     * @param success 成功
     * @param code 返回码
     * @param message 返回消息
     */
    CodeEnum(Boolean success, Integer code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    /**
     * 成功标识
     */
    private final Boolean success;

    /**
     * 状态码信息
     */
    private final Integer code;

    /**
     * 返回消息
     */
    private final String message;
}

